package org.or5e.oss.ws;

import org.or5e.oss.ws.datatypes.mail.SendMailRequest;
import org.or5e.oss.ws.datatypes.mail.SendMailResponse;
import org.or5e.oss.ws.datatypes.signin.SignInRequest;
import org.or5e.oss.ws.datatypes.signin.SignInResponse;
import org.or5e.oss.ws.datatypes.sms.SMSRequest;
import org.or5e.oss.ws.datatypes.sms.SMSResponse;

/**
 * Core Services are the consolidated services available to any user. To know how to use this Services please see the User Manual.
 * @author Ponraj Suthanthiramani
 */
public class CoreServicesAPI {
	
	/**
	 * The SMS Service method, Axis call this method when the user calls for sending the SMS Transaction. To know more about this Transaction please refer the User Manual
	 * @param _request {@link SMSRequest}
	 * @return _response (@link {@link SMSResponse}
	 */
	public SMSResponse sendSMS(SMSRequest _request) {
		Service _smsService = new SMSService();
		return (SMSResponse) _smsService.processMessage(_request);
	}
	
	/**
	 * The SendMail Service method, Axis will call this method when the user requests for the Send Mail Transaction. To know more about this Please refer the User Manual
	 * @param _request {@link SendMailRequest}
	 * @return _response {@link SendMailResponse}
	 */
	public SendMailResponse sendMail(SendMailRequest _request) {
		Service _sendMailService = new SendMailService();
		return (SendMailResponse) _sendMailService.processMessage(_request);
	}
	
	/**
	 * The Sign In Service method, Axis call this method when the user request for the login, so that they get the session id to use in the following transaction. To know more about this transaction please refer the User Manual
	 * @param _request {@link SignInRequest}
	 * @return _response {@link SignInResponse}
	 */
	public SignInResponse signIn(SignInRequest _request) {
		Service _signInService = new SignInService();
		return (SignInResponse) _signInService.processMessage(_request);
	}
}